package com.zj.sy.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author Carver zzh
 */
@Mapper
public interface CommMapper {

    Integer countsByBzdz(@Param("pos") String pos);

    Integer countsBySyfw(@Param("pos") String pos);

    Integer countsBySyrk(@Param("pos") String pos);

    Integer countsByCsbj(@Param("pos") String pos);

    Integer countsByFgyzjjzzb(@Param("pos") String pos);

    Integer countsByShzzb(@Param("pos") String pos);

    Integer countsByXxb(@Param("pos") String pos);

    Integer countsByZjtdb(@Param("pos") String pos);

    Integer countsByJmxqb(@Param("pos") String pos);

    Integer countsByJdwldb(@Param("pos") String pos);

    Integer countsByZddqb(@Param("pos") String pos);

    BigDecimal getCityArea(@Param("pos") String pos);

    List<Map<String, Object>> getGridTeam(@Param("pos") String pos);

    List<Map<String, Object>> getGridNum(@Param("pos") String pos);

    List<Map<String, Object>> getGridNum2();

    List<Map<String, Object>> getGriderRank(@Param("pos") String pos, @Param("startTime") String startTime,
                                            @Param("endTime") String endTime, @Param("sort") String sort);

    List<String> getPics(@Param("sort") String sort);

    /**
     * 社会稳定类
     *
     * @param pos
     * @param startTime
     * @param endTime
     * @return
     */
    Integer countsByShwd(@Param("pos") String pos, @Param("startTime") String startTime,
                         @Param("endTime") String endTime);

    Integer countsByShwd2(@Param("pos") String pos, @Param("startTime") String startTime,
                         @Param("endTime") String endTime);
    /**
     * 网络线索上报
     *
     * @param pos
     * @param startTime
     * @param endTime
     * @return
     */
    Integer countsByNetInfo(@Param("pos") String pos, @Param("startTime") String startTime,
                            @Param("endTime") String endTime);

    /**
     * 矛盾排查化解
     *
     * @param pos
     * @param startTime
     * @param endTime
     * @return
     */
    Integer countsByMdpc(@Param("pos") String pos, @Param("startTime") String startTime,
                         @Param("endTime") String endTime);

    /**
     * 公共安全类
     *
     * @param pos
     * @param startTime
     * @param endTime
     * @return
     */
    Integer countsByGgaq(@Param("pos") String pos, @Param("startTime") String startTime,
                         @Param("endTime") String endTime);

    /**
     * 民意搜索调查
     *
     * @param pos
     * @param startTime
     * @param endTime
     * @return
     */
    Integer countsByMyss(@Param("pos") String pos, @Param("startTime") String startTime,
                         @Param("endTime") String endTime);

    /**
     * 政策法规
     *
     * @param pos
     * @param startTime
     * @param endTime
     * @return
     */
    Integer countsByZcfg(@Param("pos") String pos, @Param("startTime") String startTime,
                         @Param("endTime") String endTime);

    /**
     * 城市管理类
     *
     * @param pos
     * @param startTime
     * @param endTime
     * @return
     */
    Integer countsByCsgl(@Param("pos") String pos, @Param("startTime") String startTime,
                         @Param("endTime") String endTime);

    List<Map<String, Object>> getEventByGgaq(@Param("pos") String pos);

    List<Map<String, Object>> getEventByCsgl(@Param("pos") String pos);

    List<Map<String, Object>> getEventByShwd(@Param("pos") String pos);

    List<Map<String, Object>> getEventByGgaq2(@Param("pos") String pos, @Param("wgId") Integer wgId, @Param("state") String state);

    List<Map<String, Object>> getEventByCsgl2(@Param("pos") String pos, @Param("wgId") Integer wgId, @Param("state") String state);

    List<Map<String, Object>> getEventByShwd2(@Param("pos") String pos, @Param("wgId") Integer wgId, @Param("state") String state);

    Integer countsShzaThisMonth(@Param("pos") String pos, @Param("startTime") String startTime,
                                @Param("endTime") String endTime);

    Integer countsMdjfThisMonth(@Param("pos") String pos, @Param("startTime") String startTime,
                                @Param("endTime") String endTime);

    Integer countsGgaqThisMonth(@Param("pos") String pos, @Param("startTime") String startTime,
                                @Param("endTime") String endTime);

    Integer countsCsglThisMonth(@Param("pos") String pos, @Param("startTime") String startTime,
                                @Param("endTime") String endTime);

    Integer countsHjbhThisMonth(@Param("pos") String pos, @Param("startTime") String startTime,
                                @Param("endTime") String endTime);

    Integer countsMsfwThisMonth(@Param("pos") String pos, @Param("startTime") String startTime,
                                @Param("endTime") String endTime);

    Integer countsShwdThisMonth(@Param("pos") String pos, @Param("startTime") String startTime,
                                @Param("endTime") String endTime);

    List<Map<String, Object>> countsShwdYear(@Param("pos") String pos);

    List<Map<String, Object>> countsMsfwYear(@Param("pos") String pos);

    List<Map<String, Object>> countsHjbhYear(@Param("pos") String pos);

    List<Map<String, Object>> countsCsglYear(@Param("pos") String pos);

    List<Map<String, Object>> countsGgaqYear(@Param("pos") String pos);

    List<Map<String, Object>> countsMdjfYear(@Param("pos") String pos);

    List<Map<String, Object>> countsShzaYear(@Param("pos") String pos);

    List<Map<String, Object>> countsGrid(@Param("pos") String pos);

    List<Map<String, Object>> getAllPopulation(String pos);

    List<Map<String, Object>> getPermanentPopulation(String pos);

    List<Map<String, Object>> getCountSGYL(String pos);

    List<Map<String, Object>> getCountWGY(String pos);

    List<Map<String, Object>> getCountNJY(String pos);

    List<Map<String, Object>> getDisputeNums(String pos);

    List<Map<String, Object>> getZMWGY(String pos);

    List<Map<String, Object>> getPointsRanking(String pos);

    List<Map<String, Object>> getZDRY(String pos);

    List<Map<String, Object>> getTSRY(String pos);

    List<Map<String, Object>> getGHDX(String pos);

    List<Map<String, Object>> getFloatingPopulation(String pos);

    List<Map<String, Object>> getHomicideCase(@Param("pos")String pos, @Param("year")Integer year);

    List<Map<String, Object>> getAssessmentRankings(String pos);

    List<Map<String, Object>> getRecentEvent2(@Param("pos") String pos, @Param("type") String type, @Param("wgbm") String wgbm, @Param("state") String state);

    List<Map<String, Object>> getRecentEvent3(@Param("pos") String pos, @Param("type") String type, @Param("wgbm") String wgbm, @Param("state") String state);


    List<Map<String, Object>> getOneToFiveEvent(@Param("pos") String pos, @Param("wgbm") String wgbm);
    
    List<Map<String, Object>> getOneToFiveEventDo(@Param("busiNumber") String busiNumber);

    List<Map<String, Object>> selectBuilding(String pos);

    List<Map<String, Object>> selectUnit(String pos);

    List<Map<String, Object>> selectTownsRank(@Param("pos") String pos, @Param("desc") Boolean desc, @Param("year") Integer year, @Param("month") Integer month, @Param("limit") Integer limit);

    Integer getWgyNum(@Param("pos") String pos);
}
